From: Keir Fraser Date: Tue, 26 May 2009 08:52:59 +0000 (+0100) Subject: PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13889 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=c7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4;p=xen.git PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels. Signed-off-by: KUWAMURA Shin'ya --- diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h index eceac2a4ff..fd696704ee 100644 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @@ -157,4 +157,8 @@ typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *); #define setup_xen_features xen_setup_features #endif +#ifndef atomic_cmpxchg +#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) +#endif + #endif